//------------------------------------------------------------------------------------
// pp5.7.java      Author:YanYuJun
//
// The game of Rock Paper Scissors
//------------------------------------------------------------------------------------
  
  import java.util.*;
     
     public class pp57
      {
        //----------------------------------------------------------------
        //Rock paper scissors
        //----------------------------------------------------------------
         
        public static void main(String[]args)
         {
          int a,b,c,d,e;
          String another;
           
	  c =0;
          d =0;
          e =0;
          Random generator = new Random();
         
          Scanner scan = new Scanner(System.in);
          Scanner scan2 = new Scanner(System.in);
  
           another = scan2.nextLine();

           System.out.println("Whatever do you like, input it and wake up the program");
           do 

             { 
           System.out.println("Enter 0(Rock) ,1(paper),2(scissors):");

           b = scan.nextInt();


            a = generator.nextInt(3);
            
   
              if(a==b)
               {
                System.out.println("You enter:" + b + "\t" +"Pc enter:" + a + "\t" +"No win but no lose");
                c++;
               }

              else
              
              if(a==2)
                if ( b ==0)
                  {
                    System.out.println("You enter:" + b + "\t" +"Pc enter:" + a + "\t" + "You win !!!");
                   d++;
                  }
                else
                  {
                    System.out.println("You enter:" + b + "\t" +"Pc enter:" + a + "\t" + "You lose QAQ!");
                   e++;
                  }

              if(a ==1)
                if ( b ==0)
                  { 
                   System.out.println("You enter:" + b + "\t" +"Pc enter:" + a + "\t" + "You win !!!"); 
                  d++;
                  }
                else
                   { 
                   System.out.println("You enter:" + b + "\t" +"Pc enter:" + a + "\t" + "You lose QAQ!");
                   e++;
                    }


              if(a ==0)
                if (b==1)
                  {
                   System.out.println("You enter:" + b + "\t" +"Pc enter:" + a + "\t" + "You win !!!");
                   d++;
                  }
                else
                  {
                   System.out.println("You enter:" + b + "\t" +"Pc enter:" + a + "\t" + "You lose QAQ!");
                   e++;
                   }
 
                   System.out.print("Do you want another one?(y/n)");
                   another = scan2.nextLine();
                
                 }
                 while(another.equalsIgnoreCase("y"));
 
                System.out.println("NO win but No lose:" +c +"\t" +"Win:" +d +"\t" +"Lose:"+e);
            }
}
